<template>
	<view v-if="Relists.length<=0">
		<image src="../../static/none.jpg" mode=""></image>
	</view>
	<view class="registration" v-else>
		<view class="registrationlist">
			<view class="list-item" v-for="(item,index) in Relists" :key="index">
				<view class="itemmess">
					
					<view class="item">
						<view class="">
						交易时间：	
						</view><view class="">
							 {{item.appointmentTime}}
						</view>
					</view>
					<view class="item">
						<view class="">
						就诊人：	
						</view><view class="">
							 {{item.patientName}}
						</view>
					</view>
					<view class="item">
						<view class="">
							交易科室：
						</view>
						<view class="">
							{{item.registrationDepartment}}
						</view>
					</view>
					<view class="item">
						<view class="">
							交易方式：
						</view>
						<view class="">
							微信支付
						</view>
						
						
					</view>
					<view class="item">
						<view class="">
							交易类型：
						</view>
						<view class="">
							线上缴费
						</view>
						
						
					</view>
					<view class="item">
						<view class="">
							就诊金额：
						</view>
						<view class="">
							{{item.money}}元
						</view>
						
						
					</view>
				</view>

			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				Relists: "",
				phone:""
			}
		},
		methods: {

		},
		onLoad() {
			this.phone=localStorage.getItem('phone')
			uni.request({
				hearder: {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				url: 'http://192.168.36.21:3000/patient/getPayMentHistory',
				method: 'POST',
				data: {
					phone: this.phone,
					password: 123456
				},
				dataType: "json",
				success: (res) => {
					console.log(res);
					this.Relists = res.data.result
					console.log(this);
					console.log(this.Relists);
				}
			})
		}
	}
</script>

<style lang="scss">
	body{
		background-color: #efefef;
	}
	image {
		width: 100vw;
		height: 600px;
	}

	.list-item {
position: relative;
		width: 100%;
		// margin-bottom: 160px
	}

	.registrationStatus {
		width: 100%;
		height: 90px;
		font-size: 18px;
		padding-left: 15px;
		padding-top: 15px;
		color: white;
		background-color: #55d5b7;
	}
	.itemmess{
		box-sizing: border-box;
		// position: absolute;
		background-color: white;
		border-radius: 8px;
		width: 95%;
		padding: 10px;
		// top: 35px;
		z-index: 888;
		margin: 10px;
		.title{
			font-weight: 600;
		}
			
		.item{
			margin: 10px 0;
			display: flex;
			justify-content: space-between;
		}
	}
</style>